Better handling of linting/packaging dependencies#680
Better handling of linting/packaging dependencies#680DimitriPapadopoulos wants to merge 2 commits intopypa:mainfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #680 +/- ##
=======================================
Coverage 55.14% 55.14%
=======================================
Files 15 15
Lines 1206 1206
=======================================
Hits 665 665
Misses 541 541 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
4e8b38e to
35e763f
Compare
- Basic support for PEP 639 requires flit version 3.11. Specify it in a single place, the [build-system] section - tox should be able to read it from there. - Intoduce a new dependency group for linting, and instruct tox to use it to install linting dependencies. Dependency groups require tox 4.
35e763f to
2c483ce
Compare
agronholm
left a comment
There was a problem hiding this comment.
I'm not convinced yet.
| commands = [["pre-commit", "run", "-a"]] | ||
|
|
||
| [tool.tox.env.pkg] | ||
| deps = ["build", "flit >= 3.8"] |
There was a problem hiding this comment.
Did you actually test this? I did, and it breaks the pkg environment because flit and build are no longer available at run-time.
There was a problem hiding this comment.
I'll have to test again. I thought tox would install the build system automatically. I'll have to investigate how to achieve that.
Is flit required or is flit-core enough?
There was a problem hiding this comment.
test_compare_sdists explicitly invokes both build and flit.
Co-authored-by: Alex Grönholm <alex.gronholm@nextday.fi>
|
I'm not totally convinced myself. Rather, I am convinced that dependency groups are the proper way to define dependencies nowadays, but unsure that it is feasible to avoid specifying the build system both at the top and the bottom of The latter does require more investigation, I'm sorry about that. |
The dependencies in |
|
I understand this is all supposed to work automatically. From the tox documentation:
At least, I understand this should work, as it lets I guess this doesn't work, as it requires the I will test all that more thoroughly, but need to understand what |
This test was contributed to the project after a failed release when setuptools was replaced with flit as the build backand, and the sdist didn't contain the expected files. I wouldn't characterize this as an important test anymore, but I have no good reason to toss it away either. I must ask, why are you so invested in making these little changes to this project? |
|
To be honest, that's because I am fed up with the cacophony that characterizes Python development tools, at odds with the initial simplicity of the language itself. The whole ecosystem reminds of Perl ("There Is More Than One Way To Do It"). That's especially true nowadays when comparing Python to more recent languages like Go and Rust. Consistency and homogeneity, especially in the Python development tools themselves, would probably help everyone package Python software in a clean, standard and maintainable way. |
|
Rust and Go have the advantage of hindsight, and Python had to solve problems these languages never had, and still don't have. That said, I don't see how the changes in this PR help with this at all. These changes only deal with how the wheel project itself is developed, and the |
Basic support for PEP 639 requires flit 3.11.
The minimal version is specified in two different places, only the first one had been updated:
wheel/pyproject.toml
Lines 1 to 2 in 56223f6
wheel/pyproject.toml
Lines 139 to 140 in 56223f6
I wonder whether a single occurrence of the minimal version is possible... It appears it should be possible to specify all dependencies in a single place. Modernize dependency handling to achieve that.